fix(evm): remove system tx presence check from executor finish()#2736
fix(evm): remove system tx presence check from executor finish()#2736
Conversation
System transaction presence is already validated by TempoConsensus in validate_block_pre_execution(). The redundant check in TempoBlockExecutor::finish() broke eth_simulateV1 because simulated blocks never include end-of-block system transactions. Amp-Thread-ID: https://ampcode.com/threads/T-019c6b81-2dfa-729c-be92-a812fb16e22c Co-authored-by: Amp <amp@ampcode.com>
|
| fn finish( | ||
| self, | ||
| ) -> Result<(Self::Evm, BlockExecutionResult<Self::Receipt>), BlockExecutionError> { | ||
| if self.section |
There was a problem hiding this comment.
if we remove this, is this field then even useful?
this isnt documented so i dont really know how this is used
There was a problem hiding this comment.
yeah this field is used in validate_tx to track section transitions:
Lines 289 to 349 in 174ae32
so the idea for this PR is that we already check on TempoConsensus side that system tx is present:
tempo/crates/consensus/src/lib.rs
Lines 167 to 171 in 174ae32
and thus executor only needs to enforce that this system tx contents are correct. given that consenus validation is skipped in simulateV1, this should unblock it
Summary
Remove the
BlockSectionvalidation fromTempoBlockExecutor::finish()that unconditionally required blocks to end with system transactions. This fixeseth_simulateV1returning-32603: end-of-block system transactions not seenon every call.Motivation
eth_simulateV1runs user-provided transactions throughTempoBlockExecutorand callsfinish(), but simulated blocks never include Tempo's end-of-block system transactions (subblock signatures/metadata), so the check always failed.System transaction presence is already validated by
TempoConsensus::validate_block_pre_execution()for real blocks, making the executor check redundant.Changes
BlockSection::System { seen_subblocks_signatures: true }guard fromTempoBlockExecutor::finish()— now delegates directly toself.inner.finish()test_finish_system_tx_not_seentest (no longer applicable)test_finishto not require pre-setting the sectionTesting
Prompted by: arsenii